import withLoadable from "@/hoc/loadable"
import Auth from "@/component/Auth"
const Login=withLoadable(()=>import('@/views/Login'))
const Home=withLoadable(()=>import('@/views/Home'))
const Dashboard=withLoadable(()=>import('@/views/dashboard'))
const Product=withLoadable(()=>import('@/views/product'))
const Statuser=withLoadable(()=>import('@/views/statuser'))
const Transaction=withLoadable(()=>import('@/views/transaction'))
const StoreIndex=withLoadable(()=>import('@/views/store/index'))
const StoreSort=withLoadable(()=>import('@/views/store/sort'))
const routes=[
    {
        path:'/login',
        element:<Login/>
    },
    {
        path:'/',
        element:<Auth><Home/></Auth>,
        children:[
            {
                path:'dashboard',
                element:<Dashboard/>
            },
            {
                path:'product',
                element:<Product/>
            },
            {
                path:'statuser',
                element:<Statuser/>
            },
            {
                path:'transaction',
                element:<Transaction/>
            },
            {
                path:'store/index',
                element:<StoreIndex/>
            },
            {
                path:'store/sort',
                element:<StoreSort/>
            }
        ]
    }
]
export default routes